<template>
  <div>计数器: {{ parentCount }}</div>
  <countBtn btnName="计数按钮" @changeCount="addParentCount"></countBtn>
</template>

<script>
  import countBtn from './components/countBtn.vue'

  export default {
    name: 'App',
    components: {
      countBtn
    },
    data() {
      return {
        parentCount: 0
      }
    },
    methods: {
      addParentCount(count) {
        console.log("父组件接收的值：", count)
        this.parentCount = count
      }
    }
  }
</script>